package com.ms.services.impl;

import javax.annotation.Resource;

import org.springframework.stereotype.Component;

import com.ms.dao.entity.basic.UserEty;
import com.ms.dao.mapper.basic.UserDao;
import com.ms.services.iface.UserService;

@Component
public class UserServiceImpl implements UserService {
	
	@Resource(name="UserDao")
	private UserDao userDao;

	@Override
	public void save(UserEty userEty) {
		if(userEty.getId() == null) {
			userDao.insert(userEty);
		}
		else {
			userDao.updateById(userEty);
		}
	}

}
